package net.csdn.business.discuss.api.service;

import com.baomidou.mybatisplus.extension.service.IService;
import net.csdn.business.discuss.api.model.dto.NewDiscussAnswerRecordDTO;
import net.csdn.business.discuss.api.model.entity.DiscussAnswerRecord;
import net.csdn.business.discuss.api.model.vo.AnswerSortVO;

import java.util.List;

/**
 * 讨论采纳答案记录Service接口
 * 
 * @author ruoyi
 * @date 2023-07-25
 */
public interface IDiscussAnswerRecordService extends IService<DiscussAnswerRecord>
{


    /**
     * 新增讨论采纳答案
     * 
     * @param params 讨论采纳答案记录
     * @return 结果
     */
    public Integer insertDiscussAnswerRecord(NewDiscussAnswerRecordDTO params);

    /**
     * 根据讨论id,删除讨论采纳答案记录
     * 
     * @param discussId 讨论id
     * @return 结果
     */
    public Integer deleteAnswerRecordByDiscussId(String discussId);



    /**
     * 查询最近30天的回复排行
     *
     * @param sourceId 所属资源id
     * @param sourceType 所属资源类型
     * @return 结果
     */
    public List<AnswerSortVO> getAnswerSort(String sourceId,Integer sourceType);
}
